<%@page import="java.util.Iterator"%>
<%@page import="shop.factory.DAOFactory"%>
<%@page import="shop.vo.ProTypeBean"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../css/bootstrap.min.css">
<title></title>
</head>
<%
	if (!(boolean)session.getAttribute("adminLogin")) {
		String path = request.getContextPath() + "/Admin/login.jsp";
		response.sendRedirect(path);
	}
	List<ProTypeBean> list = DAOFactory.getIProTypeDAOInstance().listYiji();
	Iterator<ProTypeBean> it = list.iterator();
%>
<body>
	<div class="container">
		<h3>添加二级分类</h3>
		<div class="page-header" style="margin-top:10px;"></div>
		<form action="upload.jsp?type=erji" method="post"  enctype="multipart/form-data">
			<table class="table table-bordered table-condensed table-striped">
				<tr>
					<td align="right">分类名称：</td>
					<td>
						<select name="yi">
							<option value="">==选择分类==</option>
							<%
								while (it.hasNext()) {
									ProTypeBean ptype = it.next();
							%>
							<option value="<%=ptype.getPtype_id() %>"><%=ptype.getPtype_name() %></option>
							<%
								}
							%>
						</select>&nbsp;&nbsp;
						<input type="text" name="erji">
					</td>
				</tr>
				<tr>
					<td align="right">图片：</td>
					<td><input type="file" name="file"></td>
				</tr>
				<tr>
					<td colspan="2" align="center"><input type="submit"
						value="添加二级分类">&nbsp;&nbsp;&nbsp;<input type="reset"
						value="重置"></td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>